<!DOCTYPE html>
<%@page import="ar.com.cema.methodology.analyzer.ui.ServiceLocator"%>
<%@page import="ar.com.cema.methodology.analyzer.ui.PageDirectory"%>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<link rel="stylesheet" type="text/css" href="<%=ServiceLocator.CDN%>/css/main.css">
		<script type="text/javascript" src="<%=ServiceLocator.CDN%>/js/jquery.min.js" ></script>
		<script type="text/javascript" src="<%=ServiceLocator.CDN%>/js/listbox-utils.js" ></script>
		<script type="text/javascript" src="<%=ServiceLocator.CDN%>/js/ui/UI.js" ></script>
		<script type="text/javascript" src="<%=ServiceLocator.CDN%>/js/ui/SurveyInterpreter.js" ></script>

		<title>Welcome to Methodology Survey Research Tool</title>
		<jsp:include page="<%=PageDirectory.ANALYTICS %>"></jsp:include>
	</head>
	<body class="questionnaire">
		<script type="text/javascript">
			  $.get("<%=ServiceLocator.JSON_QUESTION_LIST%>", function(data) {
				  var survey = $.parseJSON(data);
				  
				  var interpreter = new UI.SurveyInterpreter();
				  interpreter.displayContentOn("#survey-container", survey);
			  });
		</script>
		
		<section class="questionnaire-section">
			<form action="<%=ServiceLocator.ACTION_SEND_ANSWERS%>" method="post" name="questionnaireForm">
				<div id="validity-errors-container" class="survey-errors-container" >
					<jsp:include page="<%=PageDirectory.ERROR%>"></jsp:include>	
				</div> 
				<div id="survey-container" class="survey-container" ></div>
			</form>
		</section>
		<footer>
			<jsp:include page="<%=PageDirectory.FOOTER%>"></jsp:include>
		</footer>
	</body>
</html>